/*

Copyright (c) 2008. Kyle Hayes
All rights reserved.
 
@ignore
*/
package org.hayes.geronimo.model
{
	import com.adobe.cairngorm.model.ModelLocator;
	
	import mx.collections.ArrayCollection;
	   
   [Bindable]
   public class GeronimoModelLocator implements ModelLocator
   {
      private static var modelLocator:GeronimoModelLocator;
      
      public var confPath:String;
      public var hostsPath:String;
      public var virtualHosts:ArrayCollection;
      
      public static function getInstance():GeronimoModelLocator 
      {
      	if ( modelLocator == null )
      	{
      		modelLocator = new GeronimoModelLocator();
      	}      		
      	return modelLocator;
      }
      
      public function GeronimoModelLocator() 
      {	
         if ( modelLocator != null )
         {
         	throw new Error( "Only one GeronimoModelLocator instance should be instantiated" );	
         }
         
         confPath = "/etc/httpd/httpd.conf";
         hostsPath = "/etc/hosts";
         virtualHosts = new ArrayCollection();
         
      }
 
   }

}
